<!DOCTYPE html>
<html>
<!-- 我的培训课程-详情 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
            size="mini">
            <el-row>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item prop="Nameoftrainingplan">
                            <el-input type="text" v-model="Form.Nameoftrainingplan" autocomplete="off" size="mini"
                                disabled="true">
                                <template slot="prepend">
                                    {{Addingtraininginformation.Nameoftrainingplan+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11" offset="2">
                    <div class="elst-select-mini">
                        <el-form-item prop="Trainingdate">
                            <el-input type="text" v-model="Form.Trainingdate" autocomplete="off" size="mini"
                                disabled="true">
                                <template slot="prepend">
                                    {{Addingtraininginformation.Trainingdate+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item prop="Trainingvenue">
                            <el-input type="text" v-model="Form.Trainingvenue" autocomplete="off" size="mini"
                                disabled="true">
                                <template slot="prepend">
                                    {{Addingtraininginformation.Trainingvenue+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11" offset="2">
                    <div class="elst-select-mini">
                        <el-form-item size="mini" prop="Trainingtype">
                            <el-input>
                                <template slot="prepend">
                                    {{Addingtraininginformation.Trainingtype+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.Trainingtype" slot="suffix"
                                    :placeholder="Addingtraininginformation.Trainingtype" disabled="true">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in Trainingtype" :label="item.value" :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-input>

                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item prop="Trainingteacher">
                            <el-input type="text" v-model="Form.Trainingteacher" autocomplete="off" size="mini"
                                disabled="true">
                                <template slot="prepend">
                                    {{Addingtraininginformation.Trainingteacher+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>

                <el-col :span="24">
                    <el-form-item :label="Addingtraininginformation.Trainingcontents+mark.m" prop="Trainingcontents"
                        class="inputTextarea">
                        <el-input type="textarea" v-model="Form.Trainingcontents" autocomplete="off" disabled="true">
                        </el-input>
                    </el-form-item>
                </el-col>
                <el-row>
                    <el-col class="head-tool">
                        培训目标
                    </el-col>
                    <el-col :span="11">
                        <div class="elst-select-mini">
                            <el-form-item size="mini" prop="Trainingobjectives">
                                <el-input>
                                    <template slot="prepend">
                                        {{Addingtraininginformation.Trainingobjectives+mark.m}}
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="formInline.model.Trainingobjectives" slot="suffix"
                                        :placeholder="Addingtraininginformation.Trainingobjectives" disabled="true">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in Trainingobjectives" :label="item.value"
                                            :value="item.value"></el-option>
                                    </el-select>
                                </el-input>

                            </el-form-item>
                        </div>
                    </el-col>
                </el-row>
                <el-row>

                    <el-row>
                        <el-col class="head-tool">
                            对应考题
                        </el-col>
                    </el-row>
                    <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys"
                        :height="ListItem.tableHeight" border @selection-change="handleSelectionChange"
                        row-style="height:10px" style="width: 100%;">
                        <!-- <el-table-column type="selection" style="
    padding-top: 0px;
    padding-bottom: 0px;
    " algin="center" width="55" :reserve-selection="true">
                        </el-table-column> -->
                        <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="50"
                            show-overflow-tooltip="true"></el-table-column>
                        <el-table-column prop="Titleoftitle" :label="Addingtraininginformation.Titleoftitle" width="">
                        </el-table-column>

                    </el-table>
                </el-row>
                <el-row type="flex" justify="end">
                    <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                        :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes"
                        :page-size="ListItem.pagesize" :layout="ListItem.layout" :total="ListItem.total">
                    </el-pagination>
                </el-row>
                <br>
                <el-row type="flex" justify="end">
                    <el-form-item>
                        <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}
                        </el-button>
                    </el-form-item>
                </el-row>
        </el-form>






    </div>
    <script type="text/javascript">

        var app = new Vue({

            el: '#app',
            data: {
                //父业传参
                id: '',
                ListItem: ListItem,
                Trainingtype: [],
                Trainingobjectives: [],
                formInline: {
                    model: { hiddenTroubleClass: '', headOperations: '' },
                    offset: 0,
                    limit: 10
                },
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    loginName: '',
                    name: '',
                    password: '',
                    sex: '',
                    remarks: '',
                },
                //表单验证
                rules: {
                    loginName: [
                        verification.NotNull,
                        { pattern: verification.StringLengthAtoB.t.format(2, 10), message: verification.StringLengthAtoB.m.format(5, 10), trigger: 'blur' }
                    ],
                    password: [
                        verification.NotNull

                    ],
                    sex: [
                        verification.NotNullSelect
                    ],
                    name: [
                        verification.NotNull
                    ]
                }
            },

            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/Addingtraininginformation/GetList') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                btnUpLoad: function () {
                    this.$message({
                        message: '上传成功',
                        type: 'success'
                    });
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/Addingtraininginformation/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/Addingtraininginformation/get?id=' + this.id);
                },

                //删除方法
                onDelete: function () { onDelete(this, '/api/Addingtraininginformation/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/Addingtraininginformation/GetList') },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
            },
            mounted: function () {
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                this.Trainingtype = getDicData('59');
                this.Trainingobjectives = getDicData('50');
            }
        });
    </script>
</body>

</html>